package com.cksys.achievement.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cksys.achievement.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cksys.achievement.enums.RegisterEnum;
import com.cksys.achievement.enums.Roles;
import com.cksys.achievement.enums.SexEnum;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author tadechen
 * @since 2019-09-26
 */
public interface IUserService extends IService<User> {

    List<User> getUsersByUserNames(String[] usernames);

    List<User> getUsersByRealNames(String[] realNames);

    User getByUserName(String username);

    User getByRealName(String realName);

    /**
     * 判断当前id是否存在
     * @param id    用户id
     */
    Boolean isExist(Integer id);

    IPage<User> searchUser(IPage<User> page, String username, String realName, SexEnum sexEnum, Roles roles, RegisterEnum registerEnum);

    Boolean removeUser(Integer id);

    Boolean removeUsers(List<Integer> id);

}
